<template>
    <div>
        <van-nav-bar title="短信验证登录/注册" left-text="返回" left-arrow @click-left="()=>{router.push('/index')}" />
        <p>新手机号将自动注册，请详读<span>豆瓣使用权益，豆瓣个人信息保护政策</span></p>
        <van-form @submit="onSubmit">
            <van-cell-group inset>
                <van-field v-model="username" name="username" label="手机号" placeholder="手机号"
                    :rules="[{ required: true, message: '请填写手机号' }]" />
                <van-field v-model="password" type="password" name="password" label="验证码" placeholder="验证码"
                    :rules="[{ required: true, message: '请填写验证码' }]" />
            </van-cell-group>
            <div style="margin: 16px;">
                <van-button round block type="primary" native-type="submit" @click="dj">
                    登录
                </van-button>
            </div>
        </van-form>
    </div>
</template>

<script setup>
import { ref } from 'vue';
import router from '@/router';
let username = ref('');
let password = ref('');

const dj=()=>{
    router.push('/index')
}
</script>

<style>
p {
    font-size: 12px;
}

span {
    color: green;
}
</style>